package com.moli.iov.open.model.vo.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
public class VehicleGpsParamQueryVo implements Serializable {

    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date startTime;
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date endTime;
    //查询号码
    @NotNull(message = "号码不能为空")
    @Length(message = "号码长度错误，需要在1和17之间",min = 1,max = 17)
    private String num;

    /**
     * 号码类别 1:车牌号  2：车辆vin
     */
    @NotNull(message = "号码类别不能为空")
    @Length(message = "号码类别长度错误,长度需要为1",min = 1,max = 1)
    private String numType;

    @Override
    public String toString() {
        return "VehicleGpsParamQueryVo{" +
                "startTime=" + startTime +
                ", endTime=" + endTime +
                ", num='" + num + '\'' +
                ", numType='" + numType + '\'' +
                '}';
    }
}
